<?php
require_once "validacao.php";

//Evitando cache de arquivo
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header('Pragma: no-cache');
header("Cache: no-cache");
header('Expires: 0');

if(isset($_GET["pid"])) {
    $pid = $_GET["pid"];
    array_push($_SESSION["pedido"], base64_decode($pid));
	echo "<script>alert('Item adicionado ao pedido!');</script>";
	echo "<meta http-equiv='refresh' content='0;url=index.php?module=cardapio'>";
	exit;
}
header("Location: index.php");
?>